//
//  AddNewFiendRequestWindowController.m
//  HiQ
//
//  Created by shoguncao on 12-8-11.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "AddNewFriendRequestWindowController.h"
#import "AddNewFriendCenter.h"
#import "MainWindowController.h"

@implementation AddNewFriendRequestWindowController

@synthesize textout;

- (void)awakeFromNib
{
    NSString *stringOut = [[NSString alloc] initWithFormat:NSLocalizedString(@"%ld 请求添加您为好友", nil), fromId];
    [textout setStringValue:stringOut];
}

- (IBAction)onAccept:(NSButton *)sender 
{
    AddNewFriendCenter *addNewFriendCenter = [[MainWindowController sharedMainWindowController] addNewFriendCenter];
    [addNewFriendCenter sendAddFriendReply:REPLY_ACCEPT fromId:fromId toId:toId];
    
    [self close];
}

- (IBAction)onReject:(NSButton *)sender 
{
    AddNewFriendCenter *addNewFriendCenter = [[MainWindowController sharedMainWindowController] addNewFriendCenter];
    [addNewFriendCenter sendAddFriendReply:REPLY_REJECT fromId:fromId toId:toId];
    [self close];
}

@end
